<style type="text/css">
    div.opacityDialogTemplate div.dialogFront {
        position:absolute;
        z-index:9;
    }
    div.opacityDialogTemplate div.dialogBackground {
        opacity:0.5;
        background-color:black;
        width:100%;
        height:100%;
    }
</style>

<div class="opacityDialogTemplate">
    <div class="dialogFront">
        <div class="dialogContent">
            dialog template
        </div>
    </div>
    <div class="dialogBackground"></div>
</div>